package com.example.doctorsystem.service.impl;

import com.example.doctorsystem.dao.DoctorDao;
import com.example.doctorsystem.model.Doctor;
import com.example.doctorsystem.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorDao doctorDao;

    @Override
    public int register(Doctor doctor) {
        return doctorDao.registerDoctor(doctor);
    }

    @Override
    public Doctor login(String email, String password) {
        return doctorDao.loginDoctor(email, password);
    }

    @Override
    public List<Doctor> getAllDoctors() {
        return doctorDao.findAllDoctors();
    }
}
